package com.jinlia.show.modules.base.wxapp.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jinlia.show.common.core.entity.BaseEntity;
import com.jinlia.show.modules.base.config.DynamicSchemaConfig;
import com.jinlia.show.modules.base.constant.EnableStatusEnum;
import com.jinlia.show.modules.base.constant.FissionTypeEnum;
import com.jinlia.show.modules.base.constant.PayMethodTypeEnum;
import com.jinlia.show.modules.base.constant.i.IBaseEnum;
import lombok.Data;

/**
 * 裂变活动实体
 */
@Data
@TableName(value = "wxapp_fission", schema = DynamicSchemaConfig.schema_wxapp)
public class Fission  extends BaseEntity {

    private Long id;
    /**
     * 裂变类型 1-注册 2-活动
     */
    private Integer fissionType;

    public void setFissionType(Integer fissionType) {
        this.fissionType = fissionType;
        this.fissionTypeName = IBaseEnum.getLabelByValue(fissionType, FissionTypeEnum.class);
    }



    /**
     * 活动id
     */
    private Long activityId;
    /**
     *裂变主体用户openid
     */
    private String parentOpenid;
    /**
     *裂变用户openid
     */
    private String childOpenid;

    private Integer enableStatus;
    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
        this.enableStatusName = IBaseEnum.getLabelByValue(enableStatus, EnableStatusEnum.class);
    }

    private String remark;
    @TableField(exist = false)
    private String fissionTypeName;
    @TableField(exist = false)
    private String enableStatusName;

}
